package com.barbeque.mall.controller.wx;

import com.barbeque.mall.bean.BaseRespVo;
import com.barbeque.mall.bean.brand.MarketBrand;
import com.barbeque.mall.bean.param.CommonData;
import com.barbeque.mall.service.wx.WxBrandService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 苏东宇
 * @since 2022/07/19 22:28
 */
@RestController
@RequestMapping("wx/brand")
public class WxBrandController {

    @Autowired
    WxBrandService wxBrandService;

    @RequestMapping("list")
    public BaseRespVo getBrandList(Integer page,Integer limit){

        CommonData brandList = wxBrandService.getBrandList(page, limit);

        return BaseRespVo.ok(brandList);

    }

    @RequestMapping("detail")
    public BaseRespVo getBrandDetail(Integer id){
        MarketBrand brandDetail = wxBrandService.getBrandDetail(id);
        return BaseRespVo.ok(brandDetail);
    }


}
